package com.umpay.entity;

import java.util.Arrays;

/*******************************************************************
 * description : 余额控制表
 * @author liuhaidong
 * @date 2018年1月29日 下午9:18:56
 * @version 1.0
 *******************************************************************/
public class ConsumeBalControl extends BaseEntity {
    
    private static final long serialVersionUID = 1L;
    //表名前缀
    public static final String TABLENAME_PREFIX = "T_CONSUME_BAL_CONTROL_";
    
    
	@Override
	public String getTableNamePrefix() {
		return TABLENAME_PREFIX;
	}

    /***主订单状态*/
	/*** 8：记账成功、可分账*/
	public static final short ORDERSTATE_8 = 8; 
	/*** 12：分账中*/
	public static final short ORDERSTATE_12 = 12; 
	/*** 13：已分账*/
	public static final short ORDERSTATE_13 = 13; 
	/*** 14：退费中*/
	public static final short ORDERSTATE_14 = 14;
	/*** 15：已退费*/
	public static final short ORDERSTATE_15 = 15;
	
	
	/*** 余额累减标记*/
	public static final String CANCELFLAG_0 = "0"; //余额累减标记
	/*** 余额累加标记*/
	public static final String CANCELFLAG_1 = "1"; //余额累加标记 (恢复)
	
    private String trace;	//机构流水
    private String instId;	//机构号
    private Long amount;	//消费金额
    private Long splitAmount;	//分账金额
    private Long refundAmount;	//退费金额
    private Long consumBalance;	//消费余额
    private short actionCount;	//操作次数
    private String tradeCode;	//交易返回码
    private String tradeDesc;	//交易描述
    private short state;	//状态
    private String cancelFlag;	//余额累加累减标记
    private String orderType;	//订单类型
    private Long innerFee;	//内扣手续费
	/**
	 * 订单状态列表更新时使用
	 */
    private String[] inQryOrderStates;
    /**
     * 订单状态列表更新时使用
     */
    private String[] notInQryOrderStates;
    
	public String getTrace() {
		return trace;
	}
	public void setTrace(String trace) {
		this.trace = trace;
	}
	public String getInstId() {
		return instId;
	}
	public void setInstId(String instId) {
		this.instId = instId;
	}
	public Long getAmount() {
		return amount;
	}
	public void setAmount(Long amount) {
		this.amount = amount;
	}
	public Long getSplitAmount() {
		return splitAmount;
	}
	public void setSplitAmount(Long splitAmount) {
		this.splitAmount = splitAmount;
	}
	public Long getRefundAmount() {
		return refundAmount;
	}
	public void setRefundAmount(Long refundAmount) {
		this.refundAmount = refundAmount;
	}
	public Long getConsumBalance() {
		return consumBalance;
	}
	public void setConsumBalance(Long consumBalance) {
		this.consumBalance = consumBalance;
	}
	public short getActionCount() {
		return actionCount;
	}
	public void setActionCount(short actionCount) {
		this.actionCount = actionCount;
	}
	public String getTradeCode() {
		return tradeCode;
	}
	public void setTradeCode(String tradeCode) {
		this.tradeCode = tradeCode;
	}
	public String getTradeDesc() {
		return tradeDesc;
	}
	public void setTradeDesc(String tradeDesc) {
		this.tradeDesc = tradeDesc;
	}
	public short getState() {
		return state;
	}
	public void setState(short state) {
		this.state = state;
	}
	
	public String[] getInQryOrderStates() {
		return inQryOrderStates;
	}

	public void setInQryOrderStates(String[] inQryOrderStates) {
		this.inQryOrderStates = inQryOrderStates;
	}

	public String[] getNotInQryOrderStates() {
		return notInQryOrderStates;
	}

	public void setNotInQryOrderStates(String[] notInQryOrderStates) {
		this.notInQryOrderStates = notInQryOrderStates;
	}
	public String getCancelFlag() {
		return cancelFlag;
	}
	public void setCancelFlag(String cancelFlag) {
		this.cancelFlag = cancelFlag;
	}
	
	public Long getInnerFee() {
		return innerFee;
	}
	public void setInnerFee(Long innerFee) {
		this.innerFee = innerFee;
	}
	public String getOrderType() {
		return orderType;
	}
	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
	@Override
	public String toString() {
		return "ConsumeBalControl [trace=" + trace + ", instId=" + instId + ", amount=" + amount + ", splitAmount="
				+ splitAmount + ", refundAmount=" + refundAmount + ", consumBalance=" + consumBalance + ", actionCount="
				+ actionCount + ", tradeCode=" + tradeCode + ", tradeDesc=" + tradeDesc + ", state=" + state
				+ ", cancelFlag=" + cancelFlag + ", orderType=" + orderType + ", innerFee=" + innerFee
				+ ", inQryOrderStates=" + Arrays.toString(inQryOrderStates) + ", notInQryOrderStates="
				+ Arrays.toString(notInQryOrderStates) + "]";
	}
}
